﻿
IF OBJECT_ID('up_Utility_Asset_Distributions_TransformerImages_SelectById') IS not NULL
	DROP PROC up_Utility_Asset_Distributions_TransformerImages_SelectById 

GO 

CREATE PROCEDURE [dbo].[up_Utility_Asset_Distributions_TransformerImages_SelectById] 
(
	@imageID int
)
AS

SELECT 
	Utility_Asset_TransformerId as 'ID',
	inspTransformers.Vendor_Distribution_PoleFk as 'PoleID',
	transformers.ImageFilename as 'FileName'		
FROM 
	tb_Utility_Asset_Transformers transformers
INNER JOIN tb_Vendor_Distribution_Transformers inspTransformers
	ON inspTransformers.Utility_Asset_Transformers_TransformerFk = transformers.Utility_Asset_TransformerId
WHERE
	Utility_Asset_TransformerId  = @imageID
 